/*
 * Copyright(c) 2020-2100 万达信息股份有限公司 版权所有
 * WONDERS INFORMATION CO., LTD. ALL RIGHTS RESERVED.
 */

package com.wondersgroup.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: huym
 * @version: 1.0
 * @date: 2020/11/20
 */
@RestController
@RefreshScope
@Slf4j
public class TestController {

    @Value("${server.port}")
    private int port;

    @Value("${name}")
    private String name;

    @RequestMapping("/test")
    public String test(){
        return "服务调用成功，端口为："+port+" name="+name;
    }
}
